{% extends "base.html" %} {% block title %}Accounts - Quick Care Connect{% endblock %} {% block content %}
| Appt | Patient | Doctor | Amount | Booked | Approved | Payment | Paid at | Completed | Doctor credited |
|---|---|---|---|---|---|---|---|---|---|
| #{{ a.id }} | {{ a.patient.user.name if a.patient and a.patient.user else '-' }} | {{ a.doctor.user.name if a.doctor and a.doctor.user else '-' }} | PKR {{ "%.0f"|format(a.charges) }} | {{ a.created_at.strftime('%d %b %H:%M') if a.created_at else '-' }} | {{ a.approved_at.strftime('%d %b %H:%M') if a.approved_at else '-' }} | {{ a.payment_status }} | {{ a.payment_approved_at.strftime('%d %b %H:%M') if a.payment_approved_at else (a.payment_submitted_at.strftime('%d %b %H:%M') if a.payment_submitted_at else '-') }} | {{ a.completed_at.strftime('%d %b %H:%M') if a.completed_at else '-' }} | {{ a.doctor_earning_credited_at.strftime('%d %b %H:%M') if a.doctor_earning_credited_at else 'Reserve' }} |
| Appt | Doctor | Patient | Held amount (100%) | Release after |
|---|---|---|---|---|
| #{{ a.id }} | {{ a.doctor.user.name if a.doctor and a.doctor.user else '-' }} | {{ a.patient.user.name if a.patient and a.patient.user else '-' }} | PKR {{ "%.0f"|format(a.charges or 0) }} | {% if a.completion_review_deadline %} {{ a.completion_review_deadline.strftime('%d %b %Y %H:%M') }} {% elif a.status == 'approved' %} After completion + 24h {% else %} - {% endif %} |
| Appt | Patient | Doctor | Dispute reason | Date | Recordings |
|---|---|---|---|---|---|
| #{{ a.id }} | {{ a.patient.user.name if a.patient and a.patient.user else '-' }} | {{ a.doctor.user.name if a.doctor and a.doctor.user else '-' }} | {{ (a.dispute_reason or '-')[:80] }}{% if a.dispute_reason and a.dispute_reason|length > 80 %}...{% endif %} | {{ a.updated_at.strftime('%d %b %Y %H:%M') if a.updated_at else '-' }} | View |
| Type | Appt | Patient | Doctor | Refund | Doctor effect | Date |
|---|---|---|---|---|---|---|
| {% if a.status == 'expired_mutual_noshow' %} Mutual no-show {% elif a.status == 'expired_patient_noshow' %} Patient no-show {% elif a.status == 'expired_provider_failure' %} Doctor no-show {% else %} {{ a.status }} {% endif %} | #{{ a.id }} | {{ a.patient.user.name if a.patient and a.patient.user else '-' }} | {{ a.doctor.user.name if a.doctor and a.doctor.user else '-' }} | {% if a.status in ['expired_mutual_noshow','expired_provider_failure'] %}PKR {{ "%.0f"|format(a.charges) }} (refund){% else %}-{% endif %} | {% if a.status == 'expired_patient_noshow' %}80% to doctor{% elif a.status == 'expired_provider_failure' %}20% penalty{% else %}-{% endif %} | {{ a.updated_at.strftime('%d %b %Y %H:%M') if a.updated_at else '-' }} |
| Appointment | Patient | Reason | Amount | Date | |
|---|---|---|---|---|---|
| #{{ r.appointment_id }} | {{ r.patient.user.name if r.patient and r.patient.user else '-' }} | {% set reason_key = (r.reason or '')|lower %} {% if reason_key in ['mutual_no_show', 'mutual no show'] %} {{ (r.reason or 'n/a')|replace('_', ' ')|title }} {% else %} {{ (r.reason or 'n/a')|replace('_', ' ')|title }} {% endif %} | PKR {{ "%.2f"|format(r.amount) }} | {{ r.created_at.strftime('%d %b %Y') if r.created_at else '-' }} | Process |
| Doctor | Amount | Requested | |
|---|---|---|---|
| {{ p.doctor.user.name if p.doctor and p.doctor.user else '-' }} | PKR {{ "%.2f"|format(p.amount) }} | {{ p.requested_at.strftime('%d %b %Y %H:%M') if p.requested_at else '-' }} | Approve/Reject |